import { createApp } from 'vue'
import store from './store'
import router from './router'
import { v4 as uuid4 } from 'uuid'
import './utils/axios-interceptors'
import { setGlobalOptions } from 'vue-request'
// import './mock'

import '@/assets/style/global.css'
import 'virtual:uno.css'
import App from './App.vue'
import { DEVICE_ID } from './config/constant'

// useRequest
setGlobalOptions({
    pagination: {
        currentKey: 'page',
        pageSizeKey: 'limit'
    }
})

// 设备id
const uuid = localStorage.getItem(DEVICE_ID)
if (!uuid) localStorage.setItem(DEVICE_ID, uuid4())

const app = createApp(App)
app.use(store)
app.use(router)
app.mount('#app')
